import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.Executors;

public class Test {


    public boolean judge(String A, String B){
        if (A == null || B == null){
            return false;
        }
        if (A.isEmpty() || B.isEmpty()){
            return false;
        }
        if (A.length() > B.length()){
            return false;
        }
        int aIndex = A.length() - 1;
        int bIndex = B.length() - 1;
        while (aIndex >= 0 ){
            if (A.charAt(aIndex) != B.charAt(bIndex)){
                return false;
            }
            aIndex--;
            bIndex--;
        }
        if (B.charAt(bIndex) != '.'){
            return false;
        }
        return true;
    }

    public static void main(String[] args) {
        HashMap<String, String> test1 = new HashMap<>();
        test1.put(null, "a)");
        new Test().hashCode();
        System.out.println(new Test().judge("qq.com", "123.wqq.com"));
    }
}
